package ds.dsr.server.params;

import ds.dsr.server.model.ServiceInfo;
import io.netty.channel.Channel;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentLinkedQueue;
import java.util.concurrent.atomic.AtomicLong;

/**
 * @author sunchong
 * @date 2018/4/25
 */
public class ServerContext {
    /**
     * key ip:port/服务名
     */
    public static Map<String, ServiceInfo> serviceInfoTable = new ConcurrentHashMap<String, ServiceInfo>();

    /**
     * 注册服务数
     */
    public static AtomicLong onlineNum = new AtomicLong(0);

    /**
     * channle 队列
     */
    public static ConcurrentLinkedQueue<Channel> channelQuence = new ConcurrentLinkedQueue<Channel>();

}
